<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page isELIgnored="false" %>

<%
    String path = request.getContextPath();
%>
<script>
    function adminCheck() {/*管理员信息校验*/
        if (document.formAdd.adminName.value.length < 1) {
            alert("请输入用户名");
            document.formAdd.adminName.focus();
            return;
        }
        if (document.formAdd.adminPw.value.length > 0 && document.formAdd.adminPw.value.length < 6) {
            alert("密码至少6位");
            document.formAdd.adminPw.focus();
            return;
        }
        document.formAdd.submit();
    }
</script>
<jsp:include page="/admin/inc/incHead.jsp" flush="false"/>
<form action="<%=path %>/admin/adminAdd.action" name="formAdd" method="post">
    <table class="table table-bordered" align="center"
           style="margin-bottom:8px">
        <tr bgcolor="#EEF4EA">
            <td colspan="3" class='title'><span>员工添加</span></td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                用户名：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="adminName" size="20"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                密码：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="password" name="adminPw" id="userPw" size="22"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                等级：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <select name="adminLevel">
                    <option value="5" selected="selected">仅可登录</option>
                    <option value="6">可查询信息</option>
                    <option value="7">可查询修改信息</option>
                    <option value="8">可查询修改删除信息</option>
                    <option value="9">可查询修改删除信息,添加其他员工</option>
                </select>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                &nbsp;
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="button" onclick="adminCheck()" value="提交" class="btn btn-info"/>&nbsp;
            </td>
        </tr>
    </table>
</form>
<jsp:include page="/admin/inc/incFoot.jsp" flush="false"/>
